<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<html:xhtml />
<script type="text/javaScript">
    function submit() {
        document.snpSummaryForm.submit();
    }

    function showPvalue(phenotype) {
        $("#pvalueModal").load("<html:rewrite page="/assocSearchSubmit.do" /> #ajaxContent",
                               {chkSnp: 'on',
                                snps: '<bean:write name="snpSummaryForm" property="snp.rsNumber" />',
                                selectedPhenotypes: phenotype,
                                submitType: 'Search',
                                noCache: Math.random()},
                                function(response, status, xhr) {
                                    if(status == "error")
                                    {
                                        $("#pvalueModal").html(xhr.status + " " + xhr.statusText);
                                    }
                                    $("#pvalueModal").dialog("option", "title", phenotype);
                                    $("#pvalueModal").dialog("option", "height", 'auto');
                                    $("#pvalueModal").dialog("open");
                                });
    }

    $(document).ready(function() {
        $("[id$=Desc]").dialog({
            autoOpen: false,
            width: 400,
            position: "right"
        });
        $("#ldPlotHelp").click(function() {
            $("#ldPlotDesc").dialog("open");
        });
        $("#pvalueHelp").click(function() {
            $("#pvalueDesc").dialog("open");
        });
        $("#AtopyHelp").click(function() {
            $("#atopyDesc").dialog("open");
        });
        $("#AsthmaHelp").click(function() {
            $("#asthmaDesc").dialog("open");
        });
        $("#AHRHelp").click(function() {
            $("#ahrDesc").dialog("open");
        });
        $("[id=Atopic\\ AsthmaHelp]").click(function() {
            $("#atoAsthDesc").dialog("open");
        });
        $("#asthmaLink").click(function() {
            $("#asthmaDesc").dialog("open");
        });
        $("#atopyLink").click(function() {
            $("#atopyDesc").dialog("open");
        });
        $("[id$=elpDialog]").dialog({
            autoOpen: false,
            width: 400,
            position: "right"
        });
        $("#helpButton").click(function() {
            $("#helpDialog").dialog("open");
        });
        $("#generalHelpButton").click(function() {
            $("#generalHelpDialog").dialog("open");
        });
        $("#prevAssocHelpButton").click(function() {
            $("#prevAssocHelpDialog").dialog("open");
        });
        $("#genoStatusHelpButton").click(function() {
            $("#genoStatusHelpDialog").dialog("open");
        });
        $("#assocResultsHelpButton").click(function() {
            $("#assocResultsHelpDialog").dialog("open");
        });
        $("#popDiversityHelpButton").click(function() {
            $("#popDiversityHelpDialog").dialog("open");
        });
        $("#links").accordion({
            autoHeight: false
        });
        $("#pvalueModal").dialog({
            autoOpen: false,
            modal: true,
            width: 775,
            position: 'top'
        });
        $("#snpReferences").dialog({
            autoOpen: false,
            width: 800,
            modal: true
        })
    });
</script>
<div id="snpSummary" class="content summary">
    <html:form action="searchSubmit">
        <div class="input">
            <dl>
                <dt>Search SNP:</dt>
                <dd><html:text property="searchText" />&nbsp;<html:submit property="submitType" value="Search" /></dd>
            </dl>
            <html:hidden property="searchSelect" value="1" />
        </div>
    </html:form>
    <h2>
        <bean:write name="snpSummaryForm" property="snp.rsNumber" />
        <span id="helpButton" class="ui-icon help ui-icon-info">&nbsp;&nbsp;&nbsp;</span>
    </h2>
    <div id="links" class="links">
        <logic:notEmpty name="snpSummaryForm" property="snpLinks">
            <h3>
                <a href="#">SNP Links</a>
            </h3>
            <ul>
                <logic:iterate id="link" name="snpSummaryForm" property="snpLinks">
                    <li>
                        <a href='<bean:write name="link" property="url" />' target="new">
                            <bean:write name="link" property="name" />
                        </a>
                    </li>
                </logic:iterate>
            </ul>
        </logic:notEmpty>
        <logic:notEmpty name="snpSummaryForm" property="geneLinks">
            <h3>
                <a href="#">Gene Links</a>
            </h3>
            <ul>
                <logic:iterate id="link" name="snpSummaryForm" property="geneLinks">
                    <li>
                        <a href='<bean:write name="link" property="url" />' target="new">
                            <bean:write name="link" property="name" />
                        </a>
                    </li>
                </logic:iterate>
            </ul>
        </logic:notEmpty>
        <logic:notEmpty name="snpSummaryForm" property="pathwayLinks">
            <h3>
                <a href="#">Kegg Pathways</a>
            </h3>
            <ul>
                <logic:iterate id="link" name="snpSummaryForm" property="pathwayLinks">
                    <li>
                        <a href='<bean:write name="link" property="url" />' target="new" title='<bean:write name="link" property="title" />' >
                            <bean:write name="link" property="name" />
                        </a>
                    </li>
                </logic:iterate>
            </ul>
        </logic:notEmpty>
    </div>
    <div id="mainContent" class="main">
        <h3 class="ui-helper-reset ui-state-active ui-corner-all">
            <span id="generalHelpButton" class="ui-icon help ui-icon-info"></span>
            General Information
        </h3>
        <html:form action="snpSummary">
            <div class="input">
                <dl>
                    <dt>SNP:</dt>
                    <dd><bean:write name="snpSummaryForm" property="snp.rsNumber" /></dd>
                    <dt>SNP Alias:</dt>
                    <logic:empty name="snpSummaryForm" property="snpAlias">
                        <dd>None</dd>
                    </logic:empty>
                    <logic:notEmpty name="snpSummaryForm" property="snpAlias">
                        <dd><bean:write name="snpSummaryForm" property="snpAlias" /></dd>
                    </logic:notEmpty>
                    <logic:notEmpty name="snpSummaryForm" property="snp.fxnClass">
                        <dt>Function:</dt>
                        <dd><bean:write name="snpSummaryForm" property="snp.fxnClass" /></dd>
                    </logic:notEmpty>
                    <dt>Gene:</dt>
                    <dd>
                        <a href="<html:rewrite page="/geneSummary.do" />?geneName=<bean:write name="snpSummaryForm" property="snp.gene.name"/>">
                            <bean:write name="snpSummaryForm" property="snp.gene.name"/>
                        </a>
                        <html:select property="rsNumber" onchange="submit();">
                            <html:optionsCollection property="geneSnpList" label="rsNumber" value="rsNumber"/>
                        </html:select>
                    </dd>
                    <dt>Gene Alias:</dt>
                    <dd><bean:write name="snpSummaryForm" property="geneAlias"/>&nbsp;</dd>
                    <dt>
                        LD Plots:
                        <span id="ldPlotHelp" class="ui-icon help ui-icon-info">&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    </dt>
                    <dd>
                        <a onclick="openLdPlot('<bean:write name="snpSummaryForm" property="snp.gene.name"/>', 'CAPPS', 3);">CAPPS</a> |
                        <a onclick="openLdPlot('<bean:write name="snpSummaryForm" property="snp.gene.name"/>', 'SAGE', 4);">SAGE</a> |
                        <a onclick="openLdPlot('<bean:write name="snpSummaryForm" property="snp.gene.name"/>', 'SLSJ', 5);">SLSJ</a> |
                        <a onclick="openLdPlot('<bean:write name="snpSummaryForm" property="snp.gene.name"/>', 'Busselton', 6);">Busselton</a>
                    </dd>
                    <logic:equal name="snpSummaryForm" property="prevAssociations" value="true">
                        <dd>
                            <a onclick="$('#snpReferences').dialog('open');">
                                * Previous Associations
                            </a>
                            <span id="prevAssocHelpButton" class="ui-icon help ui-icon-info">&nbsp;&nbsp;&nbsp;&nbsp;</span>
                        </dd>
                    </logic:equal>
                </dl>
            </div>
        </html:form>
        <h3 class="ui-helper-reset ui-state-active ui-corner-all">
            <span id="genoStatusHelpButton" class="ui-icon help ui-icon-info"></span>
            Genotyping Status
        </h3>
        <table border="1" cellpadding="3" cellspacing="0">
            <tr>
                <logic:iterate id="cohort" name="snpSummaryForm" property="cohortList" length="4">
                    <th><bean:write name="cohort" property="name" /></th>
                </logic:iterate>
            </tr>
            <tr>
                <logic:iterate id="snpStatus" name="snpSummaryForm" property="snpStatusList" length="4">
                    <td>
                        <logic:notEmpty name="snpStatus">
                            <logic:equal name="snpStatus" property="valid" value="true">
                                <div title="Passed" class="ui-icon passed ui-icon-check" />
                            </logic:equal>
                            <logic:notEqual name="snpStatus" property="valid" value="true">
                                <div title="Failed" class="ui-icon failed ui-icon-closethick" />
                            </logic:notEqual>
                        </logic:notEmpty>
                        <logic:empty name="snpStatus">
                            <div title="Not Available" class="ui-icon na ui-icon-help" />
                        </logic:empty>
                    </td>
                </logic:iterate>
            </tr>
        </table>
        <h3 class="ui-helper-reset ui-state-active ui-corner-all">
            <span id="assocResultsHelpButton" class="ui-icon help ui-icon-info"></span>
            Association Results
        </h3>
        <div>
            <div class="input">
                <dl>
                    <dt>P-Value Plots: <span id="pvalueHelp" class="ui-icon help ui-icon-info">&nbsp;&nbsp;&nbsp;&nbsp;</span></dt>
                    <dd>
                        <logic:iterate id="entry" name="snpSummaryForm" property="snpPValueMap" type="java.util.Map.Entry" indexId="index">
                            <a onclick="showPvalue('<bean:write name="entry" property="key" />');">
                                <bean:write name="entry" property="key" />
                            </a>
                            <logic:lessEqual name="index" value="2">|</logic:lessEqual>
                        </logic:iterate>
                        <logic:empty name="snpSummaryForm" property="snpPValueMap">&nbsp;</logic:empty>
                    </dd>
                </dl>
            </div>
            <bean:define id="OR_CONDITION" value="false" />
            <logic:equal name="snpSummaryForm" property="prevAssociations" value="true">
                <bean:define id="OR_CONDITION" value="true" />
            </logic:equal>
            <logic:match name="snpSummaryForm" property="snp.fxnClass" value="nonsyn">
                <bean:define id="OR_CONDITION" value="true" />
            </logic:match>
            <logic:equal name="OR_CONDITION"  value="true">
                <p class="finePrint">* Coding non-synonymous SNPs or SNPs with prior evidence for association have only been corrected for the number of phenotypes tested.</p>
            </logic:equal>
            <logic:iterate id="entry" name="snpSummaryForm" property="snpPValueMap" type="java.util.Map.Entry" indexId="index">
                <h4>
                    <span id="<bean:write name="entry" property="key"/>Help" class="ui-icon help ui-icon-info"></span>
                    <bean:write name="entry" property="key"/>
                </h4>
                <table border="1" cellpadding="2" cellspacing="0">
                    <tr>
                        <td></td>
                        <th colspan="4">Combined</th>
                        <th colspan="4">Caucasian</th>
                    </tr>
                    <tr>
                        <td></td>
                        <th>Corrected</th>
                        <th>Uncorrected</th>
                        <th>Odds Ratio</th>
                        <th>Allele</th>
                        <th>Corrected</th>
                        <th>Uncorrected</th>
                        <th>Odds Ratio</th>
                        <th>Allele</th>
                    </tr>
                    <logic:iterate id="associationResultBean" name="entry" property="value">
                        <tr>
                            <td><bean:write name="associationResultBean" property="combinedValues.cohort.name" /></td>
                            <td>
                                <logic:notEmpty name="associationResultBean" property="combinedValues">
                                    <bean:write name="associationResultBean" property="combinedValues.correctedPValue" format="#.###"/>
                                </logic:notEmpty>
                                <logic:empty name="associationResultBean" property="combinedValues">&nbsp;</logic:empty>
                            </td>
                            <td>
                                <logic:notEmpty name="associationResultBean" property="combinedValues">
                                    <bean:write name="associationResultBean" property="combinedValues.uncorrectedPValue" format="#.###"/>
                                </logic:notEmpty>
                                <logic:empty name="associationResultBean" property="combinedValues">&nbsp;</logic:empty>
                            </td>
                            <td>
                                <logic:notEmpty name="associationResultBean" property="combinedValues">
                                    <logic:notEmpty name="associationResultBean" property="combinedValues.oddsRatio">
                                        <bean:write name="associationResultBean" property="combinedValues.oddsRatio" format="#.###"/>
                                    </logic:notEmpty>
                                    <logic:empty name="associationResultBean" property="combinedValues.oddsRatio">*</logic:empty>
                                </logic:notEmpty>
                                <logic:empty name="associationResultBean" property="combinedValues">&nbsp;</logic:empty>
                            </td>
                            <td>
                                <logic:notEmpty name="associationResultBean" property="combinedValues">
                                    <bean:write name="associationResultBean" property="combinedValues.allele"/>
                                </logic:notEmpty>
                                <logic:empty name="associationResultBean" property="combinedValues">&nbsp;</logic:empty>
                            </td>
                            <td>
                                <logic:notEmpty name="associationResultBean" property="caucasianValues">
                                    <bean:write name="associationResultBean" property="caucasianValues.correctedPValue" format="#.###"/>
                                </logic:notEmpty>
                                <logic:empty name="associationResultBean" property="caucasianValues">&nbsp;</logic:empty>
                            </td>
                            <td>
                                <logic:notEmpty name="associationResultBean" property="caucasianValues">
                                    <bean:write name="associationResultBean" property="caucasianValues.uncorrectedPValue" format="#.###"/>
                                </logic:notEmpty>
                                <logic:empty name="associationResultBean" property="caucasianValues">&nbsp;</logic:empty>
                            </td>
                            <td>
                                <logic:notEmpty name="associationResultBean" property="caucasianValues">
                                    <logic:notEmpty name="associationResultBean" property="caucasianValues.oddsRatio">
                                        <bean:write name="associationResultBean" property="caucasianValues.oddsRatio" format="#.###"/>
                                    </logic:notEmpty>
                                    <logic:empty name="associationResultBean" property="caucasianValues.oddsRatio">*</logic:empty>
                                </logic:notEmpty>
                                <logic:empty name="associationResultBean" property="caucasianValues">&nbsp;</logic:empty>
                            </td>
                            <td>
                                <logic:notEmpty name="associationResultBean" property="caucasianValues">
                                    <bean:write name="associationResultBean" property="caucasianValues.allele"/>
                                </logic:notEmpty>
                                <logic:empty name="associationResultBean" property="caucasianValues">&nbsp;</logic:empty>
                            </td>
                        </tr>
                    </logic:iterate>
                </table>
            </logic:iterate>
        </div>
        <h3 class="ui-helper-reset ui-state-active ui-corner-all">
            <span id="popDiversityHelpButton" class="ui-icon help ui-icon-info"></span>
            Population Diversity
        </h3>
        <div>
            <logic:notEmpty name="snpSummaryForm" property="populationDiversityList">
                <table border="1" cellpadding="2" cellspacing="0">
                    <tr>
                        <td colspan="2"></td>
                        <th colspan="3">Parents</th>
                        <th colspan="3">Children</th>
                    </tr>
                    <tr>
                        <th>Cohort</th>
                        <th>Ethnicity</th>
                        <th>Sample Cnt.</th>
                        <th>
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <th align="center"><bean:write name="snpSummaryForm" property="snp.majorAllele"/></th>
                                </tr>
                                <tr>
                                    <td class="progBar red">&nbsp;</td>
                                </tr>
                            </table>
                        </th>
                        <th>
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <th align="center"><bean:write name="snpSummaryForm" property="snp.minorAllele"/></th>
                                </tr>
                                <tr>
                                    <td class="progBar blue">&nbsp;</td>
                                </tr>
                            </table>
                        </th>
                        <th>Sample Cnt.</th>
                        <th>
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <th align="center"><bean:write name="snpSummaryForm" property="snp.majorAllele"/></th>
                                </tr>
                                <tr>
                                    <td class="progBar red">&nbsp;</td>
                                </tr>
                            </table>
                        </th>
                        <th>
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <th align="center"><bean:write name="snpSummaryForm" property="snp.minorAllele"/></th>
                                </tr>
                                <tr>
                                    <td class="progBar blue" >&nbsp;</td>
                                </tr>
                            </table>
                        </th>
                    </tr>
                    <logic:iterate id="freq" name="snpSummaryForm" property="populationDiversityList" type="ca.ubc.icapture.genapha.beans.PopulationDiversityBean">
                        <tr>
                            <td><bean:write name="freq" property="cohort.name"/></td>
                            <td><bean:write name="freq" property="ethnicity.ethnicity"/></td>
                            <td>
                                <logic:notEmpty name="freq" property="parent">
                                    <bean:write name="freq" property="parent.samples"/>
                                </logic:notEmpty>
                            </td>
                            <td colspan="2">
                                <logic:notEmpty name="freq" property="parent">
                                    <bean:write name="freq" property="parent.allele1Percent" format="##.###" />
                                </logic:notEmpty>
                                &nbsp;
                                <logic:notEmpty name="freq" property="parent">
                                    <bean:write name="freq" property="parent.allele2Percent" format="##.###"/>
                                </logic:notEmpty>
                                <br />
                                <logic:notEmpty name="freq" property="parent">
                                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td class="progBar red" style="width: <logic:notEmpty name="freq" property="parent"><bean:write name="freq" property="parent.allele1PercentInt" /></logic:notEmpty>%;">
                                                &nbsp;
                                            </td>
                                            <td class="progBar blue" style="width: <logic:notEmpty name="freq" property="parent"><bean:write name="freq" property="parent.allele2PercentInt" /></logic:notEmpty>%;">
                                                &nbsp;
                                            </td>
                                        </tr>
                                    </table>
                                </logic:notEmpty>
                            </td>
                            <td>
                                <logic:notEmpty name="freq" property="child">
                                    <bean:write name="freq" property="child.samples"/>
                                </logic:notEmpty>
                            </td>
                            <td colspan="2">
                                <logic:notEmpty name="freq" property="child">
                                    <bean:write name="freq" property="child.allele1Percent" format="##.###"/>
                                </logic:notEmpty>
                                &nbsp;
                                <logic:notEmpty name="freq" property="child">
                                    <bean:write name="freq" property="child.allele2Percent" format="##.###"/>
                                </logic:notEmpty>
                                <br />
                                <logic:notEmpty name="freq" property="child">
                                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td class="progBar red" style="width: <logic:notEmpty name="freq" property="child"><bean:write name="freq" property="child.allele1PercentInt" /></logic:notEmpty>%;">
                                                &nbsp;
                                            </td>
                                            <td class="progBar blue" style="width: <logic:notEmpty name="freq" property="child"><bean:write name="freq" property="child.allele2PercentInt" /></logic:notEmpty>%;">
                                                &nbsp;
                                            </td>
                                        </tr>
                                    </table>
                                </logic:notEmpty>
                            </td>
                        </tr>
                    </logic:iterate>
                </table>
            </logic:notEmpty>
            <logic:notEmpty name="snpSummaryForm" property="caseControlDiversityList">
                <table id="caseControl" border="1" cellpadding="2" cellspacing="0">
                    <tr>
                        <td colspan="2"></td>
                        <th colspan="3">Cases</th>
                        <th colspan="3">Controls</th>
                    </tr>
                    <tr>
                        <th>Cohort</th>
                        <th>Ethnicity</th>
                        <th>Sample Cnt.</th>
                        <th>
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <th align="center">
                                        <bean:write name="snpSummaryForm" property="snp.majorAllele"/>
                                    </th>
                                </tr>
                                <tr>
                                    <td class="progBar red" >
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </th>
                        <th>
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <th align="center">
                                        <bean:write name="snpSummaryForm" property="snp.minorAllele"/>
                                    </th>
                                </tr>
                                <tr>
                                    <td class="progBar blue" >
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </th>
                        <th>Sample Cnt.</th>
                        <th>
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <th align="center">
                                        <bean:write name="snpSummaryForm" property="snp.majorAllele"/>
                                    </th>
                                </tr>
                                <tr>
                                    <td class="progBar red" >
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </th>
                        <th>
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <th align="center">
                                        <bean:write name="snpSummaryForm" property="snp.minorAllele"/>
                                    </th>
                                </tr>
                                <tr>
                                    <td class="progBar blue" >
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </th>
                    </tr>
                    <logic:iterate id="freq" name="snpSummaryForm" property="caseControlDiversityList" type="ca.ubc.icapture.genapha.beans.PopulationDiversityBean">
                        <tr>
                            <td><bean:write name="freq" property="cohort.name"/></td>
                            <td><bean:write name="freq" property="ethnicity.ethnicity"/></td>
                            <td>
                                <logic:notEmpty name="freq" property="parent">
                                    <bean:write name="freq" property="parent.samples"/>
                                </logic:notEmpty>
                            </td>
                            <td colspan="2">
                                <logic:notEmpty name="freq" property="parent">
                                    <bean:write name="freq" property="parent.allele1Percent" format="##.###" />
                                </logic:notEmpty>
                                &nbsp;
                                <logic:notEmpty name="freq" property="parent">
                                    <bean:write name="freq" property="parent.allele2Percent" format="##.###"/>
                                </logic:notEmpty>
                                <br />
                                <logic:notEmpty name="freq" property="parent">
                                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td class="progBar red" style="width: <logic:notEmpty name="freq" property="parent"><bean:write name="freq" property="parent.allele1PercentInt" /></logic:notEmpty>%;">
                                                &nbsp;
                                            </td>
                                            <td class="progBar blue" style="width: <logic:notEmpty name="freq" property="parent"><bean:write name="freq" property="parent.allele2PercentInt" /></logic:notEmpty>%;">
                                                &nbsp;
                                            </td>
                                        </tr>
                                    </table>
                                </logic:notEmpty>
                            </td>
                            <td>
                                <logic:notEmpty name="freq" property="child">
                                    <bean:write name="freq" property="child.samples"/>
                                </logic:notEmpty>
                            </td>
                            <td colspan="2">
                                <logic:notEmpty name="freq" property="child">
                                    <bean:write name="freq" property="child.allele1Percent" format="##.###"/>
                                </logic:notEmpty>
                                &nbsp;
                                <logic:notEmpty name="freq" property="child">
                                    <bean:write name="freq" property="child.allele2Percent" format="##.###"/>
                                </logic:notEmpty>
                                <br />
                                <logic:notEmpty name="freq" property="child">
                                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td class="progBar red" style="width: <logic:notEmpty name="freq" property="child"><bean:write name="freq" property="child.allele1PercentInt" /></logic:notEmpty>%;">
                                                &nbsp;
                                            </td>
                                            <td class="progBar blue" style="width: <logic:notEmpty name="freq" property="child"><bean:write name="freq" property="child.allele2PercentInt" /></logic:notEmpty>%;">
                                                &nbsp;
                                            </td>
                                        </tr>
                                    </table>
                                </logic:notEmpty>
                            </td>
                        </tr>
                    </logic:iterate>
                </table>
            </logic:notEmpty>
        </div>
    </div>
</div>
<div id="helpDialog" title="SNP Summary">
    <tiles:insert name="snpSummaryHelp" />
</div>
<div id="generalHelpDialog" title="General Information">
    <tiles:insert name="snpSummaryGeneral" />
</div>
<div id="prevAssocHelpDialog" title="Previous Association">
    <tiles:insert name="snpSummaryPrevAssoc" />
</div>
<div id="genoStatusHelpDialog" title="Genotyping Status">
    <tiles:insert name="snpSummaryGenotype" />
</div>
<div id="assocResultsHelpDialog" title="Association Results">
    <tiles:insert name="snpSummaryAssocResults" />
</div>
<div id="popDiversityHelpDialog" title="Population Diversity">
    <tiles:insert name="snpSummaryPopDiver" />
</div>
<div id="pvalueDesc" title="P-value Plots">
    <p>The following are plots of the corrected P-values obtained from testing
        the association between each SNP and phenotype. Points are organized
        by chromosome position. A separate association plot is made for each
        phenotype. Plotted points represent -log10 of the corrected P-value
        of association. In addition, SNPs with a corrected P-value <= 0.05 are
        labeled by gene and RS number. A different symbol and color are used
        to help identify the cohort each point belongs to.</p>
</div>
<div id="ahrDesc" title="Airway Hyper-Responsiveness (AHR)">
    <p>Methacoline challenge testing was carried out at 7 years of age
        according to the protocol of Cockroft et al <sup>[1]</sup>. The provocative
        concentration of methacoline that induced a 20% decrease in forced
        expiratory volume in one second (FEV1) from postsaline value (PC20)
        was determined. AHR was defined as a PC20 of less than 7.8 mg/mL
        methacoline <sup>[2]</sup>.</p>
    <p class="finePrint">References:</p>
    <ol class="finePrint">
        <li>Cockcroft DW, Killian DN, Mellon JJ, Hargreave FE. Bronchial reactivity to inhaled histamine: a method and clinical survey. Clin Allergy 1977;7:235-43.</li>
        <li>Godfrey S, Springer C, Bar-Yishay E, Avital A. Cut-off  points defining normal and asthmatic bronchial reactivity to exercise and inhalation challenges in children and young adults. Eur Respir J 1999;14:659-68.</li>
    </ol>
</div>
<div id="atoAsthDesc" title="Atopic Asthma">
    <p>
        A child was considered to have atopic asthma if he/she was diagnosed
        with <a id="asthmaLink">asthma</a> or <a id="atopyLink">atopy</a>
        according to their respective definitions.
    </p>
</div>
<div id="asthmaDesc" title="Asthma">
    <p>The diagnosis of asthma, at 7 years of age, was a clinical decision
        made by the pediatric allergists<sup>[1]</sup> without knowledge of the results
        of the child questionnaire completed by nurses, allergy skin tests,
        spirometry, or methacholine challenge tests.</p>
    <p class="finePrint"><sup>[1]</sup> A pediatric allergist in each center, without knowledge of the
        group allocation status of the children and who did not provide
        health care services to the families conducted a structured
        interview with parents by using a standardized form to record
        symptoms and physical findings.</p>
</div>
<div id="atopyDesc" title="Atopy">
    <p>The diagnosis of atopy, at 7 years of age, was a clinical decision
        made by the pediatric allergists<sup>[1]</sup> without knowledge of the results
        of the child questionnaire completed by nurses, allergy skin tests,
        spirometry, or methacholine challenge tests.</p>
    <p class="finePrint"><sup>[1]</sup> A pediatric allergist in each center, without knowledge of the
        group allocation status of the children and who did not provide
        health care services to the families conducted a structured
        interview with parents by using a standardized form to record
        symptoms and physical findings.</p>
</div>
<tiles:insert name="ldPlotDesc" />
<div id="pvalueModal"></div>
<tiles:insert name="ldPlotModal" />
<logic:equal name="snpSummaryForm" property="prevAssociations" value="true">
    <div id="snpReferences" title="SNP References">
        <logic:empty name="snpSummaryForm" property="references">
            <p>There are no references for this snp.</p>
        </logic:empty>
        <logic:notEmpty name="snpSummaryForm" property="references">
            <ol>
                <logic:iterate id="ref" name="snpSummaryForm" property="references">
                    <li><bean:write name="ref" property="reference" /></li>
                </logic:iterate>
            </ol>
        </logic:notEmpty>
    </div>
</logic:equal>